package com.hrt.bean;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

/** 
 * 礼品评论表
 */
@Entity
@Table(name = "gift_comments")
@JsonIgnoreProperties(value = { "hrtMember","giftDetail"})
public class Comments implements Serializable {
	
	private static final long serialVersionUID = 1L;

	/**评论id*/
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "COMMENTS_ID")
	private Long id;
	
	/**会员实体*/
	@ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, optional = true)
	@JoinColumn(name = "MENBER_ID")
	private HRTMember hrtMember;
	
	/**会员实体Id*/
	@Column(name = "MENBER_ID",insertable=false,updatable=false)
	private Long hrtMemberId;
	
	/**会员实体名称*/
	@Column(name = "MENBER_NAME",length = 500)
	private String hrtMemberName;
	
	/** 关联礼品规格表主键 */
	@ManyToOne(cascade = {CascadeType.REFRESH, CascadeType.MERGE}, optional = false)
	@JoinColumn(name = "GDE_ID")
	private GiftDetail giftDetail;
	
	/** 礼品规格ID */
	@Column(name = "GDE_ID",insertable=false,updatable=false)
	private Long gdeId;
	
	/** 礼品规格名称 */
	@Column(name = "GDE_Name",length = 500)
	private String gdeName;
	

	/**礼品评论内容*/
	@Column(name = "COMMENTS_CONTENT", length = 500)
	private String content;
	
	/**礼品规格的评论*/
	@Column(name = "COMMENTS_CONTENTDET", length = 500)
	private Integer contentDet;
	
	/**多图片上传*/
	@Column(name = "COMMENTS_PICTURE", length = 1000)
	private String picture; 
	
	/**客服评论*/
	@Column(name = "COMMENTS_SERVICER", length = 500)
	private String servicerComm;
	
	/**物流评论 0是*/
	@Column(name = "COMMENTS_LOGISTICS", length = 500)
	private String logistics;
	
	/** 0是公开评论 1是匿名评论   */
	@Column(name = "COMMENTS_ANONYMOUS", length = 500)
	private Integer anonymous;
	
	/** 
	 * 备注 
	 */
	@Column(name = "COMMENTS_NOTE", length = 500)
	private String note;
	
	/**
	 * 删除标记 0未删除 1已删除
	 */
	@Column(name = "ISDELETE", length = 500)
	private Integer isdelete = 0;
	
	/*
	 * 
	 * 另外添加
	 * 
	 * */
	/**
	 * 订单详情
	 * */
	@Column(name = "ORD_ID",length = 500)
	private Long orderId;
	
	/**
	 * 是否回复的状态  0是没有回复  1是已经回复
	 * */
	@Column(name = "COMMENTS_ISREPLY", length = 500)
	private Integer isReply;
	
	/**
	 * 是否追评的状态  0是没有追评  1是已经追评
	 * */
	@Column(name = "ISADDCOMMENT", length = 500)
	private Integer isAddComment = 0;
	
	/**
	 * 评论时间, 默认系统当前时间
	 */
	@Column(name = "COMMENT_TIME", length = 500)
	private Timestamp commentTime;
	/* -----------------****------------------- */
	/*
	 *不在数据库显示的字段 
	 * */
	/**
	 * 记录评论时间
	 * */
	@Transient
	private String commTime;
	
	/**
	 * 追评
	 * */
	@Transient
	private List<Comments> addComm;
	
	/**回复评论*/
	@Transient
	private List<Replys> replys;
	
	/**多图片上传*/
	@Transient
	private List<String> picStrs;


	// get() / set()
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public HRTMember getHrtMember() {
		return hrtMember;
	}

	public void setHrtMember(HRTMember hrtMember) {
		this.hrtMember = hrtMember;
	}

	public Long getHrtMemberId() {
		return hrtMemberId;
	}

	public void setHrtMemberId(Long hrtMemberId) {
		this.hrtMemberId = hrtMemberId;
	}

	public String getHrtMemberName() {
		return hrtMemberName;
	}

	public void setHrtMemberName(String hrtMemberName) {
		this.hrtMemberName = hrtMemberName;
	}

	public GiftDetail getGiftDetail() {
		return giftDetail;
	}

	public void setGiftDetail(GiftDetail giftDetail) {
		this.giftDetail = giftDetail;
	}

	public Long getGdeId() {
		return gdeId;
	}

	public void setGdeId(Long gdeId) {
		this.gdeId = gdeId;
	}

	public String getGdeName() {
		return gdeName;
	}

	public void setGdeName(String gdeName) {
		this.gdeName = gdeName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public String getServicerComm() {
		return servicerComm;
	}

	public void setServicerComm(String servicerComm) {
		this.servicerComm = servicerComm;
	}

	public String getLogistics() {
		return logistics;
	}

	public void setLogistics(String logistics) {
		this.logistics = logistics;
	}

	public Integer getAnonymous() {
		return anonymous;
	}

	public void setAnonymous(Integer anonymous) {
		this.anonymous = anonymous;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Integer getIsdelete() {
		return isdelete;
	}

	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public Integer getIsReply() {
		return isReply;
	}

	public void setIsReply(Integer isReply) {
		this.isReply = isReply;
	}

	public Integer getIsAddComment() {
		return isAddComment;
	}

	public void setIsAddComment(Integer isAddComment) {
		this.isAddComment = isAddComment;
	}

	public Integer getContentDet() {
		return contentDet;
	}

	public void setContentDet(Integer contentDet) {
		this.contentDet = contentDet;
	}

	public Timestamp getCommentTime() {
		return commentTime;
	}

	public void setCommentTime(Timestamp commentTime) {
		this.commentTime = commentTime;
	}

	public String getCommTime() {
		return commTime;
	}

	public void setCommTime(String commTime) {
		this.commTime = commTime;
	}

	public List<Comments> getAddComm() {
		return addComm;
	}

	public void setAddComm(List<Comments> addComm) {
		this.addComm = addComm;
	}

	public List<Replys> getReplys() {
		return replys;
	}

	public void setReplys(List<Replys> replys) {
		this.replys = replys;
	}

	public List<String> getPicStrs() {
		return picStrs;
	}

	public void setPicStrs(List<String> picStrs) {
		this.picStrs = picStrs;
	}
	
}
